<template>
  <n-pagination class="w-full h-10 juzhong" v-model:page="page" :item-count="prop.totalnum" v-model:page-size="prop.pagesize" :on-update:page="callback" show-quick-jumper />
</template>

<script setup>
import {NPagination} from "naive-ui"
import {computed, defineEmits, defineProps, ref} from "vue"
const page = ref(1)
const prop = defineProps({
  totalnum:{
    type:Number,
    default:0,
  },
  pagesize:{
    type:Number,
    default:30,
  },
})
const emit = defineEmits(["get"])
const callback = (pageindex)=>{
  console.log("触发page改变",pageindex)
  page.value = pageindex
  emit("get",pageindex)
}
</script>

<style scoped>

</style>
